package com.example.administrator.basepro.model;



import com.example.administrator.basepro.model.bean.LoginBean;
import com.example.administrator.basepro.model.bean.TableBean;
import com.example.administrator.basepro.model.bean.TableOpeBean;
import com.example.administrator.basepro.model.bean.TableOpeBeanData;
import com.example.administrator.basepro.model.db.DBHelper;
import com.example.administrator.basepro.model.http.HttpHelper;
import com.example.administrator.basepro.model.prefs.PreferencesHelper;

import java.util.List;

import io.reactivex.Flowable;
import io.reactivex.disposables.Disposable;
import okhttp3.RequestBody;


public class DataManager implements HttpHelper, DBHelper, PreferencesHelper {

    HttpHelper mHttpHelper;
    DBHelper mDbHelper;
    PreferencesHelper mPreferencesHelper;

    public DataManager(HttpHelper httpHelper, DBHelper dbHelper, PreferencesHelper preferencesHelper) {
        mHttpHelper = httpHelper;
        mDbHelper = dbHelper;
        mPreferencesHelper = preferencesHelper;
    }

    public Flowable<LoginBean> login(RequestBody body) {
        return mHttpHelper.login(body);
    }

    public  Flowable<LoginBean> submitSecure(RequestBody bean) {
        return mHttpHelper.submitSecure(bean);
    }

    public  Flowable<TableBean> getSecureInfo() {
        return mHttpHelper.getSecureInfo();
    }

    public Flowable<LoginBean> register(RequestBody requestBody) {
        return mHttpHelper.register(requestBody);
    }
}
